<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
    <ui:composition template="/resources/templates/install.xhtml">
        <ui:define name="title">Configuration serveur logs</ui:define>
        <ui:define name="content">
            <p:panel id="installPanel" header="Configuration du serveur DHCP">
                <h:form id="formConfig">
                    <p:fieldset legend="SSH">
                        <p:panelGrid columns="2">
                            <h:outputText id="ip" value="#{configurationBean.dhcpIP.cle}"/><p:inputText required="true" value="#{configurationBean.dhcpIP.valeur}"/>
                            <h:outputText id="user" value="#{configurationBean.dhcpUser.cle}"/><p:inputText required="true" value="#{configurationBean.dhcpUser.valeur}"/>
                            <h:outputText id="pass" value="#{configurationBean.dhcpPassword.cle}"/><p:inputText required="true" value="#{configurationBean.dhcpPassword.valeur}"/>
                        </p:panelGrid>
                    </p:fieldset>
                    <p:fieldset legend="Autres">
                        <p:panelGrid columns="2">
                            <h:outputText id="debut_plage" value="#{configurationBean.dhcpDebutPlage.cle}"/><p:inputText required="true" value="#{configurationBean.dhcpDebutPlage.valeur}"/>
                            <h:outputText id="fin_plage" value="#{configurationBean.dhcpFinPlage.cle}"/><p:inputText required="true" value="#{configurationBean.dhcpFinPlage.valeur}"/>
                            <h:outputText id="path" value="#{configurationBean.dhcpPathConf.cle}"/><p:inputText required="true" value="#{configurationBean.dhcpPathConf.valeur}"/>
                        </p:panelGrid>
                    </p:fieldset>

                    <p:panel>
                        <h:outputText value="Status : " /><h:outputText id="status_text" style="color:#{clientSSHBean.statusDHCP.color}" value="#{clientSSHBean.statusDHCP.message}" /><p:commandButton id="thisbutton" update="status_text,thisbutton" value="Test de connexion" disabled="#{clientSSHBean.statusDHCP.id eq 0}" actionListener="#{configurationBean.testDHCPConnection()}" />
                        <p:poll update="status_text" />
                    </p:panel>

                    <p:tooltip value="#{configurationBean.dhcpIP.help}" for="ip"/>
                    <p:tooltip value="#{configurationBean.dhcpUser.help}" for="user"/>
                    <p:tooltip value="#{configurationBean.dhcpPassword.help}" for="pass"/>
                    <p:tooltip value="#{configurationBean.dhcpDebutPlage.help}" for="debut_plage"/>
                    <p:tooltip value="#{configurationBean.dhcpFinPlage.help}" for="fin_plage"/>
                    <p:tooltip value="#{configurationBean.dhcpPathConf.help}" for="path"/>
                </h:form>
                <h:form id="nextForm">
                    <p:toolbar>
                        <f:facet name="right">
                            <p:commandButton actionListener="#{configurationBean.saveDHCPConf()}" ajax="false" value="Suivant" iconPos="right" icon="ui-icon-arrowthick-1-e"/>
                        </f:facet>
                    </p:toolbar>
                </h:form>
            </p:panel>
        </ui:define>
        <ui:define name="dialogs">
            
        </ui:define>
    </ui:composition>
</html>
